package isjinhao.jlox.lexical;

/**
 * @Author ISJINHAO
 * @Date 2021/2/20 17:09
 */
public enum TokenType {

    /**
     * Single-character tokens.
     */
    // (
    LEFT_PAREN,
    // )
    RIGHT_PAREN,
    // {
    LEFT_BRACE,
    // }
    RIGHT_BRACE,
    // ,
    COMMA,
    // .
    DOT,
    // -
    MINUS,
    // +
    PLUS,
    // ;
    SEMICOLON,
    // /
    SLASH,
    // *
    STAR,

    /**
     * One or two character tokens.
     */
    // !
    BANG,
    // !=
    BANG_EQUAL,
    // =
    EQUAL,
    // ==
    EQUAL_EQUAL,
    // >
    GREATER,
    // >=
    GREATER_EQUAL,
    // <
    LESS,
    // <=
    LESS_EQUAL,

    /**
     * Literals.
     */
    IDENTIFIER, STRING, NUMBER,

    /**
     * Keywords.
     */
    AND, CLASS, ELSE, FALSE, FUN, FOR, IF, ELSEIF, NIL, OR,
    PRINT, RETURN, SUPER, THIS, TRUE, VAR, WHILE, DO,

    /**
     * END.
     */
    EOF
}